/*
 * Copyright (c) 2019-2020, https://api.iot.10086.cn/(https://gitee.com/cmcc-iot-api/iot-card-open-application/).
 */
package cn.iot.card.open.sim.dto.siminfo;

import cn.iot.card.open.constants.Constants;

/**
 * GPRS(自主)限速请求接收类
 *
 * @author zhanlele
 * @date 20200312 16:56:39
 * @modify 20200312 zhanlele v1.1.2 创建
 * @since v1.1.2
 */
public class GprsLimitSpeedDTO {

    /**
     * cardType 卡类型
     */
    private String cardType;
    /**
     * cardNum 卡号
     */
    private String cardNum;
    /**
     * apnName apn名称
     */
    private String apnName;
    /**
     * serviceUsageState 限速档位
     */
    private String serviceUsageState;

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getCardNum() {
        return cardNum;
    }

    public void setCardNum(String cardNum) {
        this.cardNum = cardNum;
    }

    public String getApnName() {
        return apnName;
    }

    public void setApnName(String apnName) {
        this.apnName = apnName;
    }

    public String getServiceUsageState() {
        return serviceUsageState;
    }

    public void setServiceUsageState(String serviceUsageState) {
        this.serviceUsageState = serviceUsageState;
    }

    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        switch (cardType) {
            case Constants.REQUEST_PARAM_MSISDN:
                stringBuilder.append("所查询的物联卡号码(MSISDN):").append(cardNum).append(",");
                break;
            case Constants.REQUEST_PARAM_ICCID:
                stringBuilder.append("集成电路卡识别码(ICCID):").append(cardNum).append(",");
                break;
            case Constants.REQUEST_PARAM_IMSI:
                stringBuilder.append("国际移动用户识别码(IMSI):").append(cardNum).append(",");
                break;
        }
        stringBuilder.append("apn名称:").append(apnName).append(",");
        switch (serviceUsageState) {
            case "1":
                stringBuilder.append("业务配额状态:").append("速率恢复");
                break;
            case "91":
                stringBuilder.append("业务配额状态:").append("APN-AMBR=2Mbps（月初不自动恢复）");
                break;
            case "92":
                stringBuilder.append("业务配额状态:").append("APN-AMBR=1Mbps（月初不自动恢复");
                break;
            case "93":
                stringBuilder.append("业务配额状态:").append("APN-AMBR=512Kbps（月初不自动恢复)");
                break;
            case "94":
                stringBuilder.append("业务配额状态:").append("APN-AMBR=128Kbps（月初不自动恢复)");
                break;
            case "95":
                stringBuilder.append("业务配额状态:").append("APN-AMBR=2Mbps（月初自动恢复）");
                break;
            case "96":
                stringBuilder.append("业务配额状态:").append("APN-AMBR=1Mbps（月初自动恢复）");
                break;
            case "97":
                stringBuilder.append("业务配额状态:").append("APN-AMBR=512Kbps（月初自动恢复）");
                break;
            case "98":
                stringBuilder.append("业务配额状态:").append("APN-AMBR=128Kbps（月初自动恢复）");
                break;
        }
        return stringBuilder.toString();
    }
}
